{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {
    "graffitiCellId": "id_dwzadwu"
   },
   "source": [
    "## Experiment with structs\n",
    "Press the `Compile & Run` button below to save, compile, and run the code in the terminal.\n",
    "\n",
    "Try putting in nonsensical dates and see that it will print whatever you give it!"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "graffitiCellId": "id_1spcqa0",
    "graffitiConfig": {
     "executeCellViaGraffiti": "igeynqd_loxi3a2"
    }
   },
   "outputs": [],
   "source": [
    "// Include iostream for output\n",
    "#include <iostream>\n",
    "\n",
    "// Define a simple structure\n",
    "struct Date {\n",
    "  int day;\n",
    "  int month;\n",
    "  int year;\n",
    "};\n",
    "\n",
    "// Define a main function to instantiate and test \n",
    "int main()\n",
    "{\n",
    "    Date date;\n",
    "    date.day = 1;\n",
    "    date.month = 10;\n",
    "    date.year = 2019;\n",
    "    // Print the data in the structure\n",
    "    std::cout << date.day << \"/\" << date.month << \"/\" << date.year << \"\\n\";\n",
    "}"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "graffitiCellId": "id_igeynqd"
   },
   "source": [
    "<span class=\"graffiti-highlight graffiti-id_igeynqd-id_loxi3a2\"><i></i><button>Compile & Run</button></span>&nbsp;\n",
    "<span class=\"graffiti-highlight graffiti-id_0dts92f-id_qitwoge\"><i></i><button>Explain</button></span>"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "graffitiCellId": "id_ev0mwsu",
    "graffitiConfig": {
     "rows": 6,
     "terminalId": "id_4ml8795",
     "type": "terminal"
    }
   },
   "source": [
    "<i>Loading terminal (id_ev0mwsu), please wait...</i>"
   ]
  }
 ],
 "metadata": {
  "graffiti": {
   "firstAuthorId": "8978490740",
   "id": "id_auol3m8",
   "language": "EN"
  },
  "kernelspec": {
   "display_name": "C++17",
   "language": "C++17",
   "name": "xeus-cling-cpp17"
  },
  "language_info": {
   "codemirror_mode": "text/x-c++src",
   "file_extension": ".cpp",
   "mimetype": "text/x-c++src",
   "name": "c++",
   "version": "-std=c++17"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
